package com.liliudong.template.common.constant;

import lombok.Getter;

/**
 * 异常枚举类
 *
 * @author ldli5
 * @classname ExceptionEnum
 * @date 2024/6/18-14:17
 */
@Getter
public enum ExMessageEnum {
	UNKNOWN_EXCEPTION(1000, "未知异常"),
	NOT_FOUND(1000, "资源不存在"),
	LOGIN_FAIL(1001, "登录失败"),
	TOKEN_EXCEPTION(1002, "登录状态异常"),
	NOT_LOGIN_EXCEPTION(1003, "未登录"),
	NOT_PERMISSION_EXCEPTION(1004, "无权限"),
	PARAM_EXCEPTION(1005, "参数异常"),
	CANNOT_DELETE_SUPER_ADMIN(1006, "超级管理员不可删除"),
	USER_NOT_EXIST(1007, "用户不存在"),
	DEPT_IDS_EMPTY(1008, "部门id不能为空"),
	ROLE_NOT_EXIST(1009, "角色不存在"),
	SYS_MENU_ICON_EMPTY(1010, "系统菜单图标不能为空"),
	SYS_MENU_COMPONENT_EMPTY(1011, "组件路径不能为空"),
	DATA_OCCUPIED(1012, "数据被关联，无法删除"),
	DATA_NOT_EXIST(1013, "数据不存在"),
	ROLE_PERMISSION_REPEAT(1014, "角色编码重复"),
	DEPT_NAME_REPEAT(1015, "部门名称重复");

	private final int code;
	private final String message;

	ExMessageEnum(int code, String message) {
		this.code = code;
		this.message = message;
	}

}
